<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js脚本的工作方式</title>
    <script src="./js01_base.js" async></script>
</head>
<body>

    <script>
        document.addEventListener("DOMContentLoaded",function(){
            let h1 = document.getElementById("page_title");
            alert("dom树加载完成后执行"+h1.textContent)
        })
    </script>
    <h1>JavaScript脚本工作方式</h1>



<script>
    console.log('内部js脚本')
    alert('内部js脚本')
</script>
<button onclick="alert('内联js脚本');">执行内联js脚本</button>
    
</body>
</html>